class Identifier < ActiveRecord::Base
  belongs_to :item
  
  validates_uniqueness_of :identifier_value, :case_sensitive => false,
    :scope => :identifier_type

  # validate :identifier_value_format
  
  # Stub for identifier_value format
  # Change once we've established the barcode format we're using
  def identifier_value_format
    errors.add(:identifier_value, "Incorrect format for identifier") if identifier_value.to_s.length < 5
  end
	
end
